//see LICENSE for license
//authors: Colin Schmidt, Adam Izraelevitz
package sha3

import chisel3._

object RHOPI {
  val piln = Array(
     0, 18, 21, 19, 14,
    10, 3,  24, 13,  22, 
    7, 5,  4, 12, 9, 
    11, 16, 15,  2, 6, 
    17, 8, 23,  20,  1 
  )

  val tri = Array(
      0, 36,  3, 41, 18,
      1, 44, 10, 45,  2,
     62,  6, 43, 15, 61,
     28, 55, 25, 21, 56,
     27, 20, 39,  8, 14
  )
}

object IOTA {
val round_const = VecInit(
  "h0000000000000001".U(64.W),
  "h0000000000008082".U(64.W),
  "h800000000000808a".U(64.W),
  "h8000000080008000".U(64.W),
  "h000000000000808b".U(64.W),
  "h0000000080000001".U(64.W),
  "h8000000080008081".U(64.W),
  "h8000000000008009".U(64.W),
  "h000000000000008a".U(64.W),
  "h0000000000000088".U(64.W),
  "h0000000080008009".U(64.W),
  "h000000008000000a".U(64.W),
  "h000000008000808b".U(64.W),
  "h800000000000008b".U(64.W),
  "h8000000000008089".U(64.W),
  "h8000000000008003".U(64.W),
  "h8000000000008002".U(64.W), 
  "h8000000000000080".U(64.W), 
  "h000000000000800a".U(64.W),
  "h800000008000000a".U(64.W),
  "h8000000080008081".U(64.W),
  "h8000000000008080".U(64.W),
  "h0000000080000001".U(64.W),
  "h8000000080008008".U(64.W),
  "h0000000000000000".U(64.W)  )
}
